Programming habits, patterns, and standards that have developed out of appeal to tradition/by mistake? [closed]

Posted by user828584 on Programmers See other posts from Programmers or by user828584
Published on 2012-10-01T23:55:36Z Indexed on 2012/10/02 3:54 UTC
Read the original article Hit count: 260

Being self-taught, the vast majority of what I know about programming has come from reading other peoples' code on websites like this. I'm starting to wonder if I've developed bad or otherwise pointless habits from other people, or even just made invalid assumptions.

For example, in javascript, void 0 is used in a lot of places, and until I saw this, I just assumed it was necessary and that 0 had some significance.

Also, the http header, referer is misspelled but hasn't been changed because it would break a lot of applications.

Also mentioned in Code Complete 2:

The architecture should describe the motivations for all major decisions. Be wary of “we’ve always done it that way” justifications. One story goes that Beth wanted to cook a pot roast according to an award-winning pot roast recipe handed down in her husband’s family. Her husband, Abdul, said that his mother had taught him to sprinkle it with salt and pepper, cut both ends off, put it in the pan, cover it, and cook it. Beth asked, “Why do you cut both ends off?” Abdul said, “I don’t know. I’ve always done it that way. Let me ask my mother.” He called her, and she said, “I don’t know. I’ve always done it that way. Let me ask your grandmother.” She called his grandmother, who said, “I don’t know why you do it that way. I did it that way because it was too big to fit in my pan.”

What are some other examples of this?

© Programmers or respective owner

Related posts about programming-languages

Related posts about language-agnostic